Skip to content

tests: mem_trim accepts the BC3 scratch's even-size argument - #799

Closed
madebyjordan wants to merge 1 commit into
NotRexed:mainfrom
madebyjordan:fix/mem-trim-bc-scratch-arg
Closed

madebyjordan wants to merge 1 commit into
NotRexed:mainfrom
madebyjordan:fix/mem-trim-bc-scratch-arg

Conversation

@madebyjordan

Copy link
Copy Markdown
Contributor

#705 broke tests/test_mem_trim.py, sorry about that. Its merge with #585 made both BC3 uploads call bc_scratch_layout(cmd, resized) so an upload encoded at an even size also gets the second scratch. The test looks for the exact text if (!bc_scratch_layout(cmd)) return false; twice, finds none, and "Game-free source regressions" has been red on main since f2223df (it was green at 58af2c0). #705's own CI never ran because the fork workflow approval expired.

The check now matches the call with or without the second argument. It still fails if either upload stops asking for the scratch (checked by removing one guard: the count drops to 1).

Tested: python -I -B tests/run_all.py on 232eecb + this change. test_mem_trim passes. The only other local failures are Windows-environment ones (symlink privilege in test_nup_paths, clang/<initializer_list> in test_fps_overlay_order).

🤖 Generated with Claude Code

NotRexed#705 made the two BC3 uploads call bc_scratch_layout(cmd, resized) so an
upload encoded at an even size also gets the second scratch. test_mem_trim
looked for the exact text bc_scratch_layout(cmd), found 0 of 2 and failed,
turning "Game-free source regressions" red on main since f2223df. It now
matches the call with or without that argument and still fails when either
upload stops asking for the scratch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@klimovich008

Copy link
Copy Markdown
Contributor

Confirmed independently: the unchanged current base reproduces the BC3 assertion failure. This patch passes with both the prior one-argument calls and the current resize-argument calls. Removing either current upload or copy guard makes it fail again.

The same base issue is the only source-test failure in #793; its new shader-stamp check passes on Windows and Linux. CPU source checks only; no GPU behavior claim.

@NotRexed

NotRexed commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Thank you for the fix! #806 made the same repair to tests/test_mem_trim.py (it checks each upload's resize argument separately) and has now been merged, so main's test passes. Closing this one as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants